package com.zbkj.front.controller.v2;

import com.zbkj.dal.base.page.CommonPage;
import com.zbkj.dal.base.result.CommonResult;
import com.zbkj.dal.pojo.request.PageParamRequest;
import com.zbkj.service.model.vo.BankListVO;
import com.zbkj.service.model.vo.BrandGroupVO;
import com.zbkj.service.service.MetaService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@Api("系统数据")
@RestController
@RequestMapping("/api/front/v2/meta")
public class MetaController {

    @Resource
    private MetaService metaService;

    @ApiOperation(value = "银行卡列表", tags = {"雅识账户"})
    @GetMapping(value = "/bank/list")
    public CommonResult<CommonPage<BankListVO>> bankList(PageParamRequest request) {
        return CommonResult.success(metaService.bankList(request));
    }

    @ApiOperation(value = "品牌列表")
    @GetMapping(value = "/brand/list")
    public CommonResult<List<BrandGroupVO>> brandList() {
        return CommonResult.success(metaService.brandList());
    }


}
